diff options
Diffstat (limited to 'src/pages/[locale]/index.astro')
| -rw-r--r-- | src/pages/[locale]/index.astro | 95 |
1 files changed, 54 insertions, 41 deletions
diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index c32ddf6..3674b9f 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -2,9 +2,11 @@ import Page from '$layouts/Page.astro'; import localeStaticPaths from '$lib/localeStaticPaths'; import translate from '$i18n/translate'; -import site from '$i18n/translations/site'; -import home from '$i18n/translations/pages/home'; +import tPage from '$i18n/translations/pages/home'; import type Locale from '$types/Locale'; +import { getMostRecentNewsItem } from '$lib/newsUtils'; +import NewsPreviewLink from '$components/NewsPreviewLink.astro'; +import contactDetails from '$data/contactDetails'; export async function getStaticPaths() { return localeStaticPaths; @@ -12,49 +14,60 @@ export async function getStaticPaths() { const locale = Astro.params.locale as Locale; const t = translate(locale); +const mostRecentNewsItem = await getMostRecentNewsItem(locale); --- -<Page title={t(home, { key: 'title' })}> +<Page title={t(tPage, { key: 'title' })}> <section> - <h1 class="title">{t(site, { key: 'title' })}</h1> - <h1>Tap-level heidin</h1> - <h2>Seicont-level heidin</h2> - <h3>Third-level heidin</h3> - <h4>Fowert-level heidin</h4> - <p> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - labore et dolore magna aliqua. - </p> - <a class="link" href="#">Lairn mair!</a> - <p> - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea - commodo consequat. - </p> - <button class="btn">Dae somethin excitin...</button> - <p> - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla - pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt - mollit anim id est laborum. - </p> + <h2 set:html={t(tPage, { key: 'news' })} /> + {mostRecentNewsItem && <NewsPreviewLink newsItem={mostRecentNewsItem} />} + <div class="align-end margin-block-start-md"> + <a href={`/${locale}/news`} class="btn"> + {t(tPage, { key: 'aw-news' })} ▷ + </a> + </div> </section> + + <section> + <h2 set:html={t(tPage, { key: 'furthsettins' })} /> + <p set:html={t(tPage, { key: 'furthsettins-para' })} /> + <div class="align-end"> + <a href={`/${locale}/furthsettins`} class="btn"> + {t(tPage, { key: 'aw-furthsettins' })} ▷ + </a> + </div> + </section> + <section> - <h2>Seicont-level heidin</h2> - <h3>Third-level heidin</h3> - <h4>Fowert-level heidin</h4> - <p> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - labore et dolore magna aliqua. - </p> - <a class="link" href="#">Lairn mair!</a> - <p> - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea - commodo consequat. - </p> - <button class="btn">Dae somethin excitin...</button> - <p> - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla - pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt - mollit anim id est laborum. - </p> + <h2 set:html={t(tPage, { key: 'jyne' })} /> + + <h3 set:html={t(tPage, { key: 'why-jyne' })} /> + <p set:html={t(tPage, { key: 'why-jyne-para-1' })} /> + <p set:html={t(tPage, { key: 'why-jyne-para-2' })} /> + <p set:html={t(tPage, { key: 'why-jyne-para-3' })} /> + + <h3 set:html={t(tPage, { key: 'hou-jyne' })} /> + <p set:html={t(tPage, { key: 'hou-jyne-para-1' })} /> + <p + set:html={t(tPage, { + key: 'hou-jyne-para-2', + membershipEmail: contactDetails.membershipSecretary.emailAddress, + })} + /> + </section> + + <section id="contact"> + <h2 set:html={t(tPage, { key: 'contact' })} /> + <a class="link" href={`${locale}/mailto:${contactDetails.generalEnquiries.emailAddress}`}> + {contactDetails.generalEnquiries.emailAddress} + </a> + <address> + Scots Language Society<br /> + c/o 61 Cliffburn Road<br /> + Arbroath<br /> + Angus<br /> + DD11 5BA<br /> + United Kingdom<br /> + </address> </section> </Page> |
